<?php
//$all=CoffeeShop::model()->findAll();
//foreach($all as $co){
//	$sub=trim($co->suburb);
//	$street=trim($co->street);
//	$pos=strripos($street,$sub);
//	if($pos&&$pos==strlen($street)-strlen($sub)){
//		echo  "<p>Good: {$co->id} {$co->name} $street - ".trim(substr($street,0,$pos))." / $sub</p>";
//		$co->street=trim(substr($street,0,$pos));
//		$result=$co->save();
//		echo  print_r($co->getErrors());
//	}else{
//		echo  "<p style=\"color: red\">Bad: {$co->id} {$co->name}: $street / $sub</p>";
//	}
//}

//$obj=CoffeeShop::model()->findByPk('1');
//$a1=array($obj);
//$a2=array('key'=>$obj);
//echo "<p>Before:</p>";
//echo "<p>{$obj->name}</p>";
//echo "<p>{$a1[0]->name}</p>";
//echo "<p>{$a2['key']->name}</p>";
//$obj->name='after';
//echo "<p>After:</p>";
//echo "<p>{$obj->name}</p>";
//echo "<p>{$a1[0]->name}</p>";
//echo "<p>{$a2['key']->name}</p>";

//$all=CoffeeShop::model()->findAll();
//$zoho= Yii::app()->zoho;
//echo $zoho->createLeadFromCoffeeShop($all[3]);

if(Yii::app()->user->checkAccess('cafeOwnerSubscribe',array('shop'=>1))){
	echo "yes";
}else{
	echo "no";
}
echo date('d/M/Y',1286105646 	);
echo date('d/M/Y', 	1317728046);
?>